//
//  Files.m
//  Gunz
//
//  Created by Joggy on 16/1/18.
//  Copyright © 2016年 NUPT. All rights reserved.
//

#import "Files.h"

@implementation Files

+(UIImage*)reSizeImage:(UIImage *)image size:(CGSize)size {
    UIGraphicsBeginImageContext(size);
    [image drawInRect:CGRectMake(0, 0, size.width, size.height)];
    UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return scaledImage;
}

@end


//func reSizeImage(image: UIImage, size: CGSize) ->UIImage {
//    UIGraphicsBeginImageContext(size)
//    image.drawInRect(CGRectMake(0, 0, size.width, size.height))
//    let scaledImage = UIGraphicsGetImageFromCurrentImageContext()
//    UIGraphicsEndImageContext()
//    return scaledImage
//    }
